# Author:	gong_libin
# Date:		2016_06_01

CC = g++
CFLAGS = -g -Wall
#CFLAGS += -D_GLB_DEBUG_

GLB_ENV = /root/GlbAdpTanx-1.0.0
GLB_BIN = $(GLB_ENV)/bin
GLB_INC = $(GLB_ENV)/inc
GLB_SRC = $(GLB_ENV)/src
GLB_TAN = $(GLB_ENV)/tanx

GLB_GLIB = /usr/lib
GLB_GINC = /usr/include/GlbInc

GLB_TLIB = /usr/local/lib
GLB_TINC = $(GLB_ENV)/tanx
GLB_TOBJ = $(GLB_TAN)/tanx-bidding.pb.o

export CC
export CFLAGS

export GLB_ENV
export GLB_BIN
export GLB_INC
export GLB_SRC
export GLB_TAN

export GLB_GLIB
export GLB_GINC

export GLB_TINC
export GLB_TLIB
export GLB_TOBJ

.PHONY: bin tanx test src

all: bin tanx test src

bin:
	if test -d $(GLB_BIN); then true; else mkdir $(GLB_BIN); fi;

tanx:
	$(MAKE) -C tanx

test:
	$(MAKE) -C test

src:
	$(MAKE) -C src

clean:
	$(MAKE) clean -C test
	$(MAKE) clean -C tanx
	$(MAKE) clean -C src
	rm -rf $(GLB_BIN)
